package com.github.wxiaoqi.security.biz.modules.community.entity;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.github.wxiaoqi.security.biz.modules.comment.entity.Comment;


/**
 * 
 * 
 * @author centerroot
 * @email ${email}
 * @date 2018-12-27 09:37:05
 */
@Table(name = "cms_topic")
public class CmsTopic implements Serializable {
	private static final long serialVersionUID = 1L;
	
	    //主键，雪花算法生成
    @Id
    private String id;
	
	    //平台编号
    @Column(name = "platform_id")
    private String platformId;
	
	    //商户号
    @Column(name = "merchant_id")
    private String merchantId;
	
	    //话题标题
    @Column(name = "title")
    private String title;
	
	    //话题内容
    @Column(name = "content")
    private String content;
	
	    //描述
    @Column(name = "discription")
    private String discription;
	
	    //背景图片
    @Column(name = "img")
    private String img;
	
	    //发起话题人
    @Column(name = "create_by")
    private String createBy;
	
	    //发起时间
    @Column(name = "create_time")
    private Date createTime;
	
	    //审核删除标识
    @Column(name = "flag")
    private String flag;
    
    @Transient
    private String follow;
    
    @Transient
    private Integer commentCount;
    
    @Transient
    private List<Comment> comments;
	

	/**
	 * 设置：主键，雪花算法生成
	 */
	public void setId(String id) {
		this.id = id;
	}
	/**
	 * 获取：主键，雪花算法生成
	 */
	public String getId() {
		return id;
	}
	/**
	 * 设置：机构号
	 */
	public void setPlatformId(String platformId) {
		this.platformId = platformId;
	}
	/**
	 * 获取：机构号
	 */
	public String getPlatformId() {
		return platformId;
	}
	/**
	 * 设置：商户号
	 */
	public void setMerchantId(String merchantId) {
		this.merchantId = merchantId;
	}
	/**
	 * 获取：商户号
	 */
	public String getMerchantId() {
		return merchantId;
	}
	/**
	 * 设置：话题标题
	 */
	public void setTitle(String title) {
		this.title = title;
	}
	/**
	 * 获取：话题标题
	 */
	public String getTitle() {
		return title;
	}
	/**
	 * 设置：话题内容
	 */
	public void setContent(String content) {
		this.content = content;
	}
	/**
	 * 获取：话题内容
	 */
	public String getContent() {
		return content;
	}
	/**
	 * 设置：描述
	 */
	public void setDiscription(String discription) {
		this.discription = discription;
	}
	/**
	 * 获取：描述
	 */
	public String getDiscription() {
		return discription;
	}
	/**
	 * 设置：背景图片
	 */
	public void setImg(String img) {
		this.img = img;
	}
	/**
	 * 获取：背景图片
	 */
	public String getImg() {
		return img;
	}
	/**
	 * 设置：发起话题人
	 */
	public void setCreateBy(String createBy) {
		this.createBy = createBy;
	}
	/**
	 * 获取：发起话题人
	 */
	public String getCreateBy() {
		return createBy;
	}
	/**
	 * 设置：发起时间
	 */
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	/**
	 * 获取：发起时间
	 */
	public Date getCreateTime() {
		return createTime;
	}
	/**
	 * 设置：审核删除标识
	 */
	public void setFlag(String flag) {
		this.flag = flag;
	}
	/**
	 * 获取：审核删除标识
	 */
	public String getFlag() {
		return flag;
	}
	public Integer getCommentCount() {
		return commentCount;
	}
	public void setCommentCount(Integer commentCount) {
		this.commentCount = commentCount;
	}
	public List<Comment> getComments() {
		return comments;
	}
	public void setComments(List<Comment> comments) {
		this.comments = comments;
	}
	public String getFollow() {
		return follow;
	}
	public void setFollow(String follow) {
		this.follow = follow;
	}
	@Override
	public String toString() {
		return "CmsTopic [id=" + id + ", platformId=" + platformId + ", merchantId=" + merchantId + ", title=" + title
				+ ", content=" + content + ", discription=" + discription + ", img=" + img + ", createBy=" + createBy
				+ ", createTime=" + createTime + ", flag=" + flag + ", follow=" + follow + ", commentCount="
				+ commentCount + ", comments=" + comments + "]";
	}
	
}
